package
{
	import away3d.materials.lightpickers.StaticLightPicker;
	import away3d.materials.methods.CascadeShadowMapMethod;
	import away3d.materials.methods.DitheredShadowMapMethod;
	import away3d.materials.methods.FogMethod;
	import away3d.materials.methods.NearShadowMapMethod;
	
	import flash.display.Stage;
	import flash.net.LocalConnection;
	import flash.net.NetConnection;
	import flash.text.TextField;
	import flash.utils.Dictionary;
	import flash.utils.Timer;
	
	import game.BattleWorld;
	
	import gameObject.User;
	
	import net.P2p;
	
	import views.GameView;
	
	/**
	 * 一些方便全局调用的参数
	 */
	public class Global
	{
		public static var stage:Stage;
		//php服务相关
		public static const serverAdr:String = "robtl.122m.com";
		public static var phpGateway:String = "//"+serverAdr+"/gateway.php";
		public static var iniAddress:String = "http://"+serverAdr+"/ini/";
		public static var assetPath:String = "http://"+serverAdr+"/asset/";
		public static var phpServer:NetConnection = new NetConnection;
		
		//p2p服务相关
		public static var p2pAddress:String;
		public static var P2PServer:P2p;
		//////////////////////////////
		//游戏3D视图
		public static var gameView:GameView;
		//3dmax中的动画帧率，设置正确动画播放速度才正常
		public static var maxframeRate:uint = 30;
		
		//全局灯光设置
		public static var lightPicker:StaticLightPicker = new StaticLightPicker([]);
		public static var shadowMethod:NearShadowMapMethod;
		public static var fogMethod:FogMethod = new FogMethod(1000,3000,0x87B0E7);
		///////////////////////////////////
		//玩家uid
		public static var uid:uint;
		//玩家
		public static var user:User;
		
		//所有敌物暂时放在这里
		public static var enemyValues:Dictionary = new Dictionary;
		public static var enemyMeshs:Dictionary = new Dictionary;
		
		public static var mapResources:Dictionary = new Dictionary;
		///////////////////////////////////
		public static function gc():void//清理内存
		{
			try{   
				new LocalConnection().connect("foo"); 
				new LocalConnection().connect("foo"); 
			}catch(e:*){}
		}
		
	}
}